﻿{% extends "diary/base.html" %}
{% load diary_tags %}
{% block content %}
<div id="main-container" class="container clearfix">
    <section class="post-left">
        <div class="breadcrumb">您的位置： <a itemprop="breadcrumb" href="{% url "diary:index" %}">首页</a> » <span
                                                                    class="current">{{ categoryoflog.name }}</span></div>
        <div class="index-main clearfix">
            <div class="main-title">
                <h4 class="post-left-title">分类：{{ categoryoflog.name }}(共计{% cat_logs categoryoflog.id %}篇)</h4>
            </div>
            <div class="row">
                {% for log in loglist %}
                    <div class="article-box clearfix excerpt-1">
                        <div class="col-md-4">
                            <div class="thumbnail">
                                <a href="{% url "diary:index" %}show-{{ log.id }}.html" title="{{ log.title }}">
                                    <img src="/media/{{ log.img }}"
                                         srcset="/media/{{ log.img }}"
                                         alt="{{ log.title }}" class="wp-post-image" width="240" height="160"/></a>
                            </div>
                        </div>
                        <div class="col-md-8">
                            <h2><a href="{% url "diary:index" %}show-{{ log.id }}.html" target="_blank"
                                                                                         title="{{ log.title }}">{{ log.title }}</a></h2>
                            <p class="txtcont hidden-xs"><a href="{% url "diary:index" %}show-{{ log.id }}.html"
                                                            target="_blank"
                                                            title="{{ log.title }}">{{ log.excerpt }}</a></p>
                            <div class="meta"><span class="label label-info"><a
                                                    href="{% url "diary:index" %}list-{{ categoryoflog.id }}.html">{{ categoryoflog.name }}</a></span>
                                <time class="item"><i
                                      class="fa fa-clock-o"></i>{{ log.date|date:"Y月m月d日 周w"|weekchinese }}
                                </time>
                            </div>
                        </div>
                    </div>
                {% endfor %}
            </div>
            <div class="pagination">
                <ul>
                    {% if loglist.has_previous %}
                        <li class="prev-page"><a href="?page={{ loglist.previous_page_number }}">上一页</a></li>
                    {% endif %}

                    {% for num in paginator.page_range %}
                        {% list_page loglist.number num %}
                    {% endfor %}

                    {% if loglist.has_next %}
                        <li class="next-page"><a href="?page={{ loglist.next_page_number }}">下一页</a></li>
                    {% else %}

                    <li class="next-page"></li>
                    {% endif %}
                </ul>
            </div>
        </div>
    </section>
    {% include "diary/right.html" %}
</div>
{% endblock %}
